from log import LOGGER


def float_eq(a, b):
    return abs(a - b) < 0.000001


def log_and_raise(exc, err_msg):
    LOGGER.error(err_msg)
    raise exc(err_msg)
